const state = {
  options: [
    {value: '选项1', label: 'label1'},
    {value: '选项2', label: 'label2'},
    {value: '选项3', label: 'label3'}
  ],
  value: '选项2'
}

const mutations = {
  SET_OPTION: (state, value) => {
    state.value = value
  },
}

const actions = {
  changeOption({ commit }, data) {
    commit('SET_OPTION', data)
  }
}

export default {
  namespaced: true,
  state,
  mutations,
  actions
}